import http from '@/utils/request'

export function getArticleInfo(id){
    return async (dispatch) =>{
        const res = await http.get(`articles/${id}`)
        // console.log(res)
        const info = res.data
        dispatch({
            type:'article/setArticleInfo',
            payload: info
        })
    }
}